//
// Created by herbert on 18-10-17.
//

#include <iostream>
using std::cout;
using std::endl;
int main(){

    int ival = 1.01;
    cout<<ival<<endl;
    int &rval2 = ival;
    cout<<rval2<<endl;
//    int &rvall = 1.01; # 错误
//    int &rvall = 1; # 错误


    int i =0,&r1=i ;
    double d = 0,&r2=d;
    r2=3.143;
//    r2=r1;
    i=r2;
    cout<<i<<endl;


    return 0;
}